package com.tuanzi.loan.business.service.family.impl;

import com.tuanzi.loan.business.entity.family.ProductTongdunManyHead;
import com.tuanzi.loan.business.repository.family.ProductTongdunManyHeadRepository;
import com.tuanzi.loan.business.service.family.ProductTongdunManyHeadInfoService;
import com.tuanzi.loan.core.aspect.Debug;
import com.tuanzi.loan.core.repository.JPAAuditRepository;
import com.tuanzi.loan.core.service.BaseAuditServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.retry.RetryException;
import org.springframework.retry.annotation.Retryable;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * @author caiwanlin
 * @create 2019-02-18 17:03
 */
@Debug
@Service
@Transactional
@Retryable(value = { RetryException.class })
public class ProductTongdunManyHeadInfoServiceImpl extends BaseAuditServiceImpl<ProductTongdunManyHead,Long> implements ProductTongdunManyHeadInfoService{
    @Autowired
    private ProductTongdunManyHeadRepository productTongdunManyHeadRepository;
    @Override
    protected JPAAuditRepository<ProductTongdunManyHead, Long> getRepository() {
        return productTongdunManyHeadRepository;
    }

    @Override
    public List<ProductTongdunManyHead> findByActivityId(Long activityId) {
        return productTongdunManyHeadRepository.findByActivityId(activityId);
    }
}
